package com.dd.mapper;

import com.dd.model.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 客户Mapper接口
 */
public interface CustomerMapper {
    
    /**
     * 查询所有客户
     */
    List<Customer> findAll();
    
    /**
     * 根据ID查询客户
     */
    Customer findById(@Param("customerId") Integer customerId);
    
    /**
     * 根据邮箱查询客户
     */
    Customer findByEmail(@Param("email") String email);
    
    /**
     * 根据名称模糊查询客户
     */
    List<Customer> findByNameLike(@Param("name") String name);
    
    /**
     * 添加客户
     */
    int insert(Customer customer);
    
    /**
     * 更新客户
     */
    int update(Customer customer);
    
    /**
     * 删除客户
     */
    int deleteById(@Param("customerId") Integer customerId);
} 